package okl.lab.components.interfaces
{
	import mx.collections.ArrayCollection;
	import mx.collections.IList;
	import mx.core.IUIComponent;

	//[Event(name="change", type="flash.events.Event")]
	//[Event(name="dataChange", type="mx.events.FlexEvent")]
	
	/**
	 *	View interface provides access to <code>dataFiltered</code> subset of <code>dataProvider</code>
	 * 	filtered by <code>searchTerm</code> 
	 */
	public interface IFilterAndSortList extends IUIComponent
	{
	
		/**
		 *  Set of data to be filtered and sorted.
		 *  Property is used to populate list with filtered set.
		 *  @default null
		 *  @see mx.collections.ICollectionView
		 */
		function get dataProvider():ArrayCollection;		
		/**
		 * @private
		 */
		function set dataProvider(value:ArrayCollection):void;
		
		/**
		 *	Filter word for dataProvider (term entered by user)
		 */
		function get searchTerm():String;
		/**
		 * @private
		 */
		function set searchTerm(value:String):void;
		
		/**
		 *	Filtered and sorted dataProvider (displayed in list)
		 */
		function get dataFiltered():ArrayCollection;
		
		
		//============DATA DISPAY SETTINGS==============/
		/**
		 * Defines formatting for items in list
		 */
		function set labelFunction(value:Function):void;
		
		/**
		 * Filter property name. The string value of this property is compared with searchTerm to get <code>dataFiltered</code>
		 */
		function set dataFilterField(value:String):void;
		
		/**
		 * Property names used to sort <code>dataProvider</code>
		 */
		function set dataSortFields(value:Array):void;
	
		
		

	}
}